//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "tyr_airdrop\fn_informPlayer.sqf"
#include <core_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_source","_target","_text"];
DEFAULT_PARAM(_source,0,objNull);
DEFAULT_PARAM(_target,1,objNull);
DEFAULT_PARAM(_text,2,"");

_display = "";
if (IS_OBJECT(_target) && {!isNull _target} && { player == _target }) then {
	if (IS_ARRAY(_text)) then {
		if (count _text > 0) then {
			_text set [0, localize(_text select 0)];
			TRACE_1("Array",_text);
			_display = format _text;
		} else {
			_display = "";
		};
	} else {
		_display = localize _text;
	};
	TRACE_1("Display",_display);
	if (_display != "") then {
		PAPABEAR sideChat _display;
	};
};

TRACE("End");
TMFPROFILERSTOP;
